<script id="content" type="text/template">
	<div class="btn-group">
		<a href="<!--helper {'anchor-query-transaction_state'()}-->" class="btn btn-default <!--if{http().anchor.query.transaction_state}--><!--else-->active<!--/if-->">全部交易状态</a>
		<a href="<!--helper {'anchor-query-transaction_state'('1')}-->" class="btn btn-default <!--if{http().anchor.query.transaction_state == '1'}-->active<!--/if-->">已完成</a>
		<a href="<!--helper {'anchor-query-transaction_state'('0')}-->" class="btn btn-default <!--if{http().anchor.query.transaction_state == '0'}-->active<!--/if-->">未完成</a>
	</div>
	
	<div class="btn-group">
		<a href="<!--helper {'anchor-query-state'()}-->" class="btn btn-default <!--if{http().anchor.query.state}--><!--else-->active<!--/if-->">全部订单状态</a>
		<a href="<!--helper {'anchor-query-state'('1')}-->" class="btn btn-default <!--if{http().anchor.query.state == '1'}-->active<!--/if-->">已确认</a>
		<a href="<!--helper {'anchor-query-state'('0')}-->" class="btn btn-default <!--if{http().anchor.query.state == '0'}-->active<!--/if-->">已取消</a>
	</div>
	<div class="btn-group">
		<a href="<!--helper {'anchor-query-pay_state'()}-->" class="btn btn-default <!--if{http().anchor.query.pay_state}--><!--else-->active<!--/if-->">全部支付状态</a>
		<a href="<!--helper {'anchor-query-pay_state'('1')}-->" class="btn btn-default <!--if{http().anchor.query.pay_state == '1'}-->active<!--/if-->">已支付</a>
		<a href="<!--helper {'anchor-query-pay_state'('2')}-->" class="btn btn-default <!--if{http().anchor.query.pay_state == '2'}-->active<!--/if-->">支付中</a>
		<a href="<!--helper {'anchor-query-pay_state'('0')}-->" class="btn btn-default <!--if{http().anchor.query.pay_state == '0'}-->active<!--/if-->">未支付</a>
	</div>
	<div class="btn-group">
		<a href="<!--helper {'anchor-query-shipping_state'()}-->" class="btn btn-default <!--if{http().anchor.query.shipping_state}--><!--else-->active<!--/if-->">全部物流状态</a>
		<a href="<!--helper {'anchor-query-shipping_state'('0')}-->" class="btn btn-default <!--if{http().anchor.query.shipping_state == '0'}-->active<!--/if-->">未发货/待发货</a>
		<a href="<!--helper {'anchor-query-shipping_state'('2')}-->" class="btn btn-default <!--if{http().anchor.query.shipping_state == '2'}-->active<!--/if-->">运送中</a>
		<a href="<!--helper {'anchor-query-shipping_state'('1')}-->" class="btn btn-default <!--if{http().anchor.query.shipping_state == '1'}-->active<!--/if-->">已收货</a>
	</div>
	
	<button class="btn btn-warning" type="button" action-button="trash"><span class="glyphicon glyphicon-trash"></span> 回收</button>
	<button class="btn btn-default search" type="button" ><span class="glyphicon glyphicon-filter"></span> 筛选</button>
	<!--if{http().anchor.query.search}--><span class="label label-default">存在筛选</span><!--/if-->
	<hr/>
	
	<table class="table table-striped">
      <thead>
        <tr>
          <th><input type="checkbox" action-table="checkbox-all"></th>	
          <th>#</th>
          <th>
          	<!--if{http().anchor.query.sort == "order_id_desc"}-->
          	<a href="javascript:;" action-sort="order_id_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>订单ID</a>
          	<!--elseif{http().anchor.query.sort == "order_id_asc"}-->
          	<a href="javascript:;" action-sort="order_id_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>订单ID</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="order_id_desc">订单ID</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "consignee_desc"}-->
          	<a href="javascript:;" action-sort="consignee_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>收货人信息</a>
          	<!--elseif{http().anchor.query.sort == "consignee_asc"}-->
          	<a href="javascript:;" action-sort="consignee_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>收货人信息</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="consignee_desc">收货人信息</a>
          	<!--/if-->
          </th>
          
          <th>
          	<!--if{http().anchor.query.sort == "user_nickname_desc"}-->
          	<a href="javascript:;" action-sort="user_nickname_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>用户信息</a>
          	<!--elseif{http().anchor.query.sort == "user_nickname_asc"}-->
          	<a href="javascript:;" action-sort="user_nickname_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>用户信息</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="user_nickname_desc">用户信息</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "insert_time_desc"}-->
          	<a href="javascript:;" action-sort="insert_time_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>下单时间</a>
          	<!--elseif{http().anchor.query.sort == "insert_time_asc"}-->
          	<a href="javascript:;" action-sort="insert_time_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>下单时间</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="insert_time_desc">下单时间</a>
          	<!--/if-->
          	/
          	<!--if{http().anchor.query.sort == "update_time_desc"}-->
          	<a href="javascript:;" action-sort="update_time_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>更新时间</a>
          	<!--elseif{http().anchor.query.sort == "update_time_asc"}-->
          	<a href="javascript:;" action-sort="update_time_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>更新时间</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="update_time_desc">更新时间</a>
          	<!--/if-->
          </th>
          
          <th>
          	<!--if{http().anchor.query.sort == "money_desc"}-->
          	<a href="javascript:;" action-sort="money_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>应付金额</a>
          	<!--elseif{http().anchor.query.sort == "money_asc"}-->
          	<a href="javascript:;" action-sort="money_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>应付金额</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="money_desc">应付金额</a>
          	<!--/if-->
          	/
          	<!--if{http().anchor.query.sort == "credit_desc"}-->
          	<a href="javascript:;" action-sort="credit_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>应付积分</a>
          	<!--elseif{http().anchor.query.sort == "credit_asc"}-->
          	<a href="javascript:;" action-sort="credit_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>应付积分</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="credit_desc">应付积分</a>
          	<!--/if-->
          </th>
          
          <th>
          	<!--if{http().anchor.query.sort == "pay_money_desc"}-->
          	<a href="javascript:;" action-sort="pay_money_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>付款金额</a>
          	<!--elseif{http().anchor.query.sort == "pay_money_asc"}-->
          	<a href="javascript:;" action-sort="pay_money_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>付款金额</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="pay_money_desc">付款金额</a>
          	<!--/if-->
          	/
          	<!--if{http().anchor.query.sort == "pay_credit_desc"}-->
          	<a href="javascript:;" action-sort="pay_credit_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>付款积分</a>
          	<!--elseif{http().anchor.query.sort == "pay_credit_asc"}-->
          	<a href="javascript:;" action-sort="pay_credit_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>付款积分</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="pay_credit_desc">付款积分</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "state_desc"}-->
          	<a href="javascript:;" action-sort="state_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>订单状态</a>
          	<!--elseif{http().anchor.query.sort == "state_asc"}-->
          	<a href="javascript:;" action-sort="state_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>订单状态</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="state_desc">订单状态</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "pay_state_desc"}-->
          	<a href="javascript:;" action-sort="pay_state_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>付款状态</a>
          	<!--elseif{http().anchor.query.sort == "pay_state_asc"}-->
          	<a href="javascript:;" action-sort="pay_state_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>付款状态</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="pay_state_desc">付款状态</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "shipping_state_desc"}-->
          	<a href="javascript:;" action-sort="shipping_state_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>物流状态</a>
          	<!--elseif{http().anchor.query.sort == "shipping_state_asc"}-->
          	<a href="javascript:;" action-sort="shipping_state_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>物流状态</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="shipping_state_desc">物流状态</a>
          	<!--/if-->
          </th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
      	<!--if{response.list.data.length}-->
      	<!--for{var i in response.list.data}-->
      	<tr>
		<th><input type="checkbox" action-table="checkbox" data-id="<!--{response.list.data[i].shop_order_id}-->"></th>
		<td><!--{parseInt(i)+1+((parseInt(response.list.page_now) - 1) * response.list.page_size)}--></td>
		<td><!--{response.list.data[i].shop_order_id}--></td>
		<td><!--{response.list.data[i].user_address_consignee}--></td>
		<td style="max-width: 200px;">
          	<div style="max-width: 200px;display: inline-block;">
	          <!--if{response.list.data[i].user_logo_image_id}-->
	          <img src="<!--{response.application_config.qiniu_domain+response.list.data[i].user_logo_image_id+'?imageView2/1/w/30'}-->" class="img-circle">
	          <!--/if-->
	          <!--if{response.list.data[i].user_nickname}-->
	          <!--{response.list.data[i].user_nickname}-->
	          <!--else-->
	          <span style="color: #999999;">未设置昵称</span>
	          <!--/if-->
	          <!--if{response.list.data[i].user_phone_verify_list}-->
	          	(<span style="word-wrap:break-word;"><!--{response.list.data[i].user_phone_verify_list}--></span>)
	          <!--else-->
	          <span style="color: #999999;">无认证手机</span>
	          <!--/if-->
          </div>
        </td>
        <td>
        	<div><!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.list.data[i].shop_order_insert_time) * 1000)}--></div>
        	<div><!--{WangAho().date("yyyy/MM/dd HH:mm:ss", parseInt(response.list.data[i].shop_order_update_time) * 1000)}--></div>
        </td>
		<td>
			<!--{(parseInt(response.list.data[i].shop_order_money)/100).toFixed(2)}--> 元/<!--{(response.list.data[i].shop_order_credit/response.application_config.credit.scale).toFixed(response.application_config.credit.precision)}--> 积分
		</td>
		<td>
			<!--{(parseInt(response.list.data[i].shop_order_pay_money)/100).toFixed(2)}--> 元/<!--{(response.list.data[i].shop_order_pay_credit/response.application_config.credit.scale).toFixed(response.application_config.credit.precision)}--> 积分
		</td>
		<td>
		<!--if{parseInt(response.list.data[i].shop_order_state) == 0}-->
		<span class="label label-danger">已取消</span>
		<!--elseif{parseInt(response.list.data[i].shop_order_state) == 1}-->
		<span class="label label-success">已确认</span>
		<!--else-->
		<span class="label label-default">未知</span>
		<!--/if-->
		</td>
		
		<td>
		<!--if{parseInt(response.list.data[i].shop_order_pay_state) == 0}-->
		<span class="label label-danger">未支付</span>
		<!--elseif{parseInt(response.list.data[i].shop_order_pay_state) == 1}-->
		<span class="label label-success">已支付</span>
		<!--elseif{parseInt(response.list.data[i].shop_order_pay_state) == 2}-->
		<span class="label label-warning">支付中</span>
		<!--else-->
		<span class="label label-default">未知</span>
		<!--/if-->
		</td>
		
		<td>
		<!--if{parseInt(response.list.data[i].shop_order_shipping_state) == 0}-->
			<!--if{parseInt(response.list.data[i].shop_order_pay_state) == 1}-->
			<span class="label label-warning">待发货</span>
			<!--else-->
			<span class="label label-danger">未发货</span>
			<!--/if-->
		<!--elseif{parseInt(response.list.data[i].shop_order_shipping_state) == 2}-->
		<span class="label label-info">运送中</span>
		<!--elseif{parseInt(response.list.data[i].shop_order_shipping_state) == 1}-->
		<span class="label label-success">已收货</span>
		<!--else-->
		<span class="label label-default">未知</span>
		<!--/if-->
		</td>
		
		<td>
      		<a href="#/shop/order_details/?id=<!--{response.list.data[i].shop_order_id}-->" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-share"></span>查看详情</a>
        </td>
          
        </tr>
        <!--/for-->
      	<!--else-->
        <tr>
          <td colspan="10" align="center">无数据</td>
        </tr>
        <!--/if-->
      </tbody>
    </table>
    
    
	    
    <!--if{response.list.data.length}-->
	<div class="paging" style="text-align: center;">
		<button class="first btn btn-default <!--if helper{"is_first_page" (response.list.page_now)}-->disabled<!--/if-->" data-page="1" type="button">首页</button>
		<button class="previous btn btn-default <!--if helper{"is_first_page" (response.list.page_now)}-->disabled<!--/if-->" data-page="<!--{parseInt(response.list.page_now) - 1}-->" type="button">上一页</button>
		<button class="btn btn-default" type="button">
			第<!--{response.list.page_now}-->页
			/ 共<!--{response.list.page_count}-->页
			/ 有<!--{response.list.row_count}-->条数据</button>
		<button class="next btn btn-default <!--if helper{"is_end_page" (response.list.page_now, response.list.page_count)}-->disabled<!--/if-->" type="button" data-page="<!--{parseInt(response.list.page_now) + 1}-->">下一页</button>
		<button class="end btn btn-default <!--if helper{"is_end_page" (response.list.page_now, response.list.page_count)}-->disabled<!--/if-->" type="button" data-page="<!--{response.list.page_count}-->">尾页</button>
	</div>
	<div class="form-inline" style="text-align: center;margin-top: 10px;">
		<div class="form-group">
			<input type="text" class="form-control paging--value" placeholder="输入跳转页" style="width: 100px;">
		</div>
		<button type="button" class="btn btn-default paging--submit">跳转</button>
	</div>
	<!--/if-->
	
	
	
</script>




<script id="search" type="text/template">
	<div style="padding: 10px;width: 500px;">
		<div class="form-group">
		    <label>订单ID：</label>
		    <input type="text" class="form-control" search placeholder="输入要搜索的订单ID" name="shop_order_id" value="<!--{search.shop_order_id}-->">
		</div>
		
		<div class="form-group">
		    <label>用户ID：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的用户ID" name="user_id" value="<!--{search.user_id}-->">
		</div>
		<div class="form-group">
		    <label>用户昵称：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的用户昵称" name="user_nickname" value="<!--{search.user_nickname}-->">
		</div>
		<div class="form-group">
		    <label>用户手机号：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的用户手机号" name="user_phone" value="<!--{search.user_phone}-->">
		</div>
		
		<br/>
		<div class="btn-group" style="width: 100%;">
			<button type="button" class="btn btn-primary" style="width: 50%;" name="search-submit">确定筛选</button>
			<button type="button" class="btn btn-default" style="width: 50%;" name="search-clear">清理筛选</button>
		</div>
	</div>
</script>



